﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using ST.Buz.Base.Entity;

namespace ST.Buz.Base.Mapping
{
	public partial class Map_WX_TplMsgLog : IEntityTypeConfiguration<WX_TplMsgLog>
	{
		public void Configure(EntityTypeBuilder<WX_TplMsgLog> builder)
		{
			builder.HasKey(m => new { m.ID })
				.HasName("PK_WX_TplMsgLog")
				.IsClustered(true);

			builder.HasIndex(m => new { m.RemindState })
				.HasName("IX_WX_TplMsgLog_RemindState")
				.IsClustered(false);

			builder.Property(e => e.XCXID)
				.IsUnicode(false);

			builder.Property(e => e.TplCode)
				.IsUnicode(false);

			builder.Property(e => e.XCXPagePath)
				.IsUnicode(false);

			builder.Property(e => e.Url)
				.IsUnicode(false);

			builder.Property(e => e.AddDate)
				.HasDefaultValueSql("(getdate())")
				.ValueGeneratedNever();
		}
	}
}
